package com.google.code.sip.ucenter.ws.dto;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;

/**
 * 积分类型传输类
 * 
 * @author Liuye
 * 
 */
@XmlRootElement(name = "creditRule")
@XmlSeeAlso(BaseDto.class)
@XmlAccessorType(XmlAccessType.FIELD)
@SuppressWarnings("serial")
public class CreditTypeDto extends BaseDto {
	/**
	 * 积分名称
	 */
	private String name;

	/**
	 * 积分标题
	 */
	private String title;
	/**
	 * 是否有效
	 */
	private boolean available;

	/**
	 * 积分图标
	 */
	private String image;

	/**
	 * 积分单位
	 */
	private String unit;

	/**
	 * 积分兑换比率
	 * 
	 * 兑换比率为单项积分对应一个单位标准积分的值，例如 extcredits1 的比率为 1.5(相当于 1.5
	 * 个单位标准积分)、extcredits2 的比率为 3(相当于 3 个单位标准积分)、extcredits3 的比率为 15(相当于 15
	 * 个单位标准积分)，则 extcredits3 的 1 分相当于 extcredits2 的 5 分或 extcredits1 的 10
	 * 分。一旦设置兑换比率，则用户将可以在个人中心自行兑换各项设置了兑换比率的积分，如不希望实行积分自由兑换，请将其兑换比率设置为 0
	 */
	private float ratio;

	/**
	 * 注册/创建用户时的初始积分
	 */
	private int initCredit;

	/**
	 * 允许兑出
	 */
	private boolean allowExchangeOut;

	/**
	 * 允许兑入
	 */
	private boolean allowExchangeIn;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public boolean isAvailable() {
		return available;
	}

	public void setAvailable(boolean available) {
		this.available = available;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public float getRatio() {
		return ratio;
	}

	public void setRatio(float ratio) {
		this.ratio = ratio;
	}

	public int getInitCredit() {
		return initCredit;
	}

	public void setInitCredit(int initCredit) {
		this.initCredit = initCredit;
	}

	public boolean isAllowExchangeOut() {
		return allowExchangeOut;
	}

	public void setAllowExchangeOut(boolean allowExchangeOut) {
		this.allowExchangeOut = allowExchangeOut;
	}

	public boolean isAllowExchangeIn() {
		return allowExchangeIn;
	}

	public void setAllowExchangeIn(boolean allowExchangeIn) {
		this.allowExchangeIn = allowExchangeIn;
	}
}
